package com.vrv.vap.baseline.service.impl;

import com.vrv.vap.baseline.config.ExcelTemplateConfig;
import com.vrv.vap.baseline.entity.BaseSecurityDomain;
import com.vrv.vap.baseline.mapper.BaseSecurityDomainMapper;
import com.vrv.vap.baseline.service.AbstractExcelExportService;
import com.vrv.vap.baseline.util.FileOperationUtil;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BaseSecurityDomainExportService extends AbstractExcelExportService<BaseSecurityDomain> {
    private final BaseSecurityDomainMapper baseSecurityDomainMapper;

    public BaseSecurityDomainExportService(FileOperationUtil fileOperationUtil,
                                          ExcelTemplateConfig excelTemplateConfig,
                                          BaseSecurityDomainMapper baseSecurityDomainMapper) {
        super(fileOperationUtil, excelTemplateConfig, "base_security_domain");
        this.baseSecurityDomainMapper = baseSecurityDomainMapper;
    }

    @Override
    protected List<BaseSecurityDomain> getAllData() {
        return baseSecurityDomainMapper.selectAll();
    }

    @Override
    protected void processData(List<BaseSecurityDomain> dataList, String format) {
        // 默认实现，不需要特殊处理
    }

    @Override
    protected Class<BaseSecurityDomain> getEntityClass() {
        return BaseSecurityDomain.class;
    }
}